DokuWiki

It's better when it's simple

User Tools

Site Tools


install:fedora

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
install:fedora [2024-04-26 16:46] – [Solution 3] 2a02:8012:102b:0:120b:db7:2bbd:6bcinstall:fedora [2024-04-26 17:03] (current) – [Solution 3] 2a02:8012:102b:0:120b:db7:2bbd:6bc
Line 96: Line 96:
 ==== Solution 3 ==== ==== Solution 3 ====
  
-The Fedora ''dokuwiki-selinux-20230404a-4.fc40.noarch'' package's postinstall-script creates the following fcontext policy entries:+The Fedora ''dokuwiki-selinux-20230404a-4.fc40.noarch'' package's postinstall-script adds the following fcontext policy entries:
  
 <code> <code>
Line 105: Line 105:
 restorecon -R '/usr/share/dokuwiki' restorecon -R '/usr/share/dokuwiki'
 </code> </code>
- 
-You may want to consider adapting and running these commands. 
  
 In addition, The Fedora dokuwiki package places the ''data'' subdirectory in ''/var/lib/dokuwiki'', which has the following policy: In addition, The Fedora dokuwiki package places the ''data'' subdirectory in ''/var/lib/dokuwiki'', which has the following policy:
  
-  $ ls -laZ /var/lib/dokuwiki/ +<code> 
-  total 12 +$ ls -laZ /var/lib/dokuwiki/ 
-  drwxr-xr-x.  3 root   root   system_u:object_r:httpd_sys_rw_content_t:s0 4096 Apr 26 15:28 . +total 12 
-  drwxr-xr-x. 28 root   root   system_u:object_r:var_lib_t:s0              4096 Apr 26 15:28 .. +drwxr-xr-x.  3 root   root   system_u:object_r:httpd_sys_rw_content_t:s0 4096 Apr 26 15:28 . 
-  drwxr-xr-x. 13 apache apache system_u:object_r:httpd_sys_rw_content_t:s0 4096 Apr 26 15:28 data+drwxr-xr-x. 28 root   root   system_u:object_r:var_lib_t:s0              4096 Apr 26 15:28 .. 
 +drwxr-xr-x. 13 apache apache system_u:object_r:httpd_sys_rw_content_t:s0 4096 Apr 26 15:28 data 
 +</code>
  
 +Based on the above, the following policies should be needed when installing dokuwiki from the original tarball under /srv/http/wiki.example.net/:
 +
 +<code>
 +semanage fcontext -a -t httpd_sys_content_t '/srv/http/wiki.example.net(/.*)?'
 +semanage fcontext -a -t httpd_sys_rw_content_t '/srv/http/wiki.example.net/conf(/.*)?'
 +semanage fcontext -a -t httpd_sys_rw_content_t '/srv/http/wiki.example.net/data(/.*)?'
 +semanage fcontext -a -t httpd_sys_rw_content_t '/srv/http/wiki.example.net/lib/plugins(/.*)?'
 +</code>
 ==== Solution 4 ==== ==== Solution 4 ====
 The ''chcon'' command changes the SELinux context for files temporary. These changes do not survive a file system relabel, or the ''restorecon'' command. The ''chcon'' command changes the SELinux context for files temporary. These changes do not survive a file system relabel, or the ''restorecon'' command.
install/fedora.txt · Last modified: 2024-04-26 17:03 by 2a02:8012:102b:0:120b:db7:2bbd:6bc

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki